using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Joy.Erp.BasicArchives.Core.Filters;

namespace Joy.Erp.BasicArchives.Procurements
{
    public interface IPurchaseRequisitionAppService
    {
        Task<PurchaseRequisitionDto> GetAsync(Guid id);
        Task<PurchaseRequisitionLineDto> GetChildAsync(Guid id);
        Task<PurchaseRequisitionDto> FindAsync(string filter);
        Task<PurchaseRequisitionDto> FindBySourceKeyAsync(string sourceKey, string sourceType);
        Task<PagedResultDto<PurchaseRequisitionDto>> GetListAsync(FilterRequestDto input);
        Task<PagedResultDto<PurchaseRequisitionDto>> QueryAsync(FilterGroupRequestDto input);
        Task<PagedResultDto<PurchaseRequisitionLineDto>> QueryChildrenAsync(FilterGroupRequestDto input);
        Task<PurchaseRequisitionDto> CreateAsync(PurchaseRequisitionCreateDto input);
        Task<PurchaseRequisitionDto> UpdateAsync(Guid id, PurchaseRequisitionUpdateDto input);
        Task<PurchaseRequisitionDto> SubmitAsync(Guid id);
        Task<PurchaseRequisitionDto> ApproveAsync(Guid id);
        Task<PurchaseRequisitionDto> UnApproveAsync(Guid id);
        Task DeleteAsync(Guid id);
        Task<List<PurchaseRequisitionDto>> BatchCreateAsync(List<PurchaseRequisitionCreateDto> inputs, bool useBulk = false);
        Task<List<PurchaseRequisitionDto>> BatchUpdateAsync(List<PurchaseRequisitionBatchUpdateDto> inputs, bool useBulk = false);
        Task BatchDeleteAsync(List<Guid> ids, bool useBulk = false);
    }
}